package car;

public class PaidTransport extends Car {
	private static final int MINIMUM_BUS_STOPS = 0;
	private static final int MAXIMUM_BUS_STOPS = 100;
	private static final int MINIMUM_TICKET_PRICE = 0;
	private static final double TICKET_PRICE_INCRESE = 0.50;
	private int placesForLuggage;
	private int busStops;
	private boolean isOnElec;
	private double ticketPrice;

	PaidTransport() {
		setDriverHaveUnpaiedTaxes(false);
	}

	public boolean isOnElec() {
		return isOnElec;
	}

	public void setOnElec(boolean isOnElec) {
		this.isOnElec = isOnElec;
	}

	public int getPlacesForLuggage() {
		return placesForLuggage;
	}

	public void setPlacesForLuggage(int placesForLuggage) {
		this.placesForLuggage = placesForLuggage;
	}

	public int getBusStops() {
		return busStops;
	}

	public void setBusStops(int busStops) {
		if (busStops >= MINIMUM_BUS_STOPS && busStops<=MAXIMUM_BUS_STOPS)
			this.busStops = busStops;
	}

	public double getTicketPrice() {
		return ticketPrice;
	}

	public void setTicketPrice(double ticketPrice) {
		if (ticketPrice > MINIMUM_TICKET_PRICE)
			this.ticketPrice = ticketPrice;
	}

	void moveToAnotherStop() {
		setBusStops(getBusStops() + 1);
		System.out.println("Moved to next stop: " + getBusStops());
	}

	void riseTicketPrice(){
		setTicketPrice(getTicketPrice()+TICKET_PRICE_INCRESE);
		System.out.println("Ticket price has increesed to: " + getTicketPrice());
	}
}
